s = {1, 2, 3, 3, 4}  # 默认去重
print(s)

#
l = [1, 2, 3, 4, 5, 6, 6]
# print(list(set(l)))


# l1 = []
# for i in l:
#     if i not in l1:
#         l1.append(i)
# print(l1)

# d = {}
# for i in l:
#     d[i] = "1"
# print(list(d.keys()))

# s = set({})  # 空集合
# s = set({})
# s.add(1)
# s.add(2)
# s.add(1)
# print(s)

# 其他Api自行百度一下

# 交集 差集 并集
s = {1, 2, 3}
s1 = {3, 4, 5}
print(s & s1)  # 交集
print(s | s1)  # 并集
print(s - s1)  # 差集
print(s1 - s)  # 差集
